// pages/components/area/area.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    showAera:{
      type:Boolean,
      value:false
    },
    province:{
      type:null,
      value:null
    },
    city: {
      type: null,
      value: null
    },
    county: {
      type: null,
      value: null
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    prckerValue:[0,0,0]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    _CRemove(){
      this.setData({
        showAera:false
      });
    },
    _CPickerView(e){
      let td = this.data;
      // let priker_first_item = e.detail.value[0];
      // let priker_nth_item = e.detail.value[1];
      // let priker_last_item = e.detail.value[2];
      this.setData({
        prckerValue:e.detail.value
      });
      // this.triggerEvent("changePriker",{
      //   province: td.province[priker_first_item],
      //   city: td.city[priker_nth_item],
      //   county: td.county[priker_last_item]
      // },{});
    },
    _CConfirm(){
      let td = this.data, pv_item = td.prckerValue;

      this.triggerEvent("confirm", {
        province: td.province[pv_item[0]],
        city: td.city[pv_item[1]],
        county: td.county[pv_item[2]]
      }, {});
    }
  }
})
